package com.ruoyi.bizsys.domain;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.TableField;
import com.ruoyi.common.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;

import lombok.Data;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.IdType;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 借据冲账管理对象 loan_offset
 *
 * @author african-loan
 * @date 2021-12-30
 */

@Data
public class LoanOffset extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /***间隔借据？天还款*/
    @TableField(exist = false)
    private int repayDayIndex;
    /***精确到天的日期*/
    @TableField(exist = false)
    private String repayDate;
    // 以上非数据库映射 已经排除，wqg
    @TableField(exist = false)
    private Date payTimeOrder;

    /**
     * PK
     */

    @Excel(name = "${comment}", readConverterExp = "PK")
    @TableId(type = IdType.AUTO)
    private Long id;


    /**
     * 客户号
     */

    @Excel(name = "客户号")
    private String custNo;


    /**
     * 借据编号
     */

    @Excel(name = "借据编号")
    private String loanSerialNo;


    /**
     * 还款流水号
     */

    @Excel(name = "还款流水号")
    private String repaymentNo;

    /**
     * 子借据号
     */
    private long loanSerialDeferredNo;

    /**
     * 减免流水号
     */

    @Excel(name = "减免流水号")
    private String remissionNo;


    /**
     * 冲账类别
     */

    @Excel(name = "冲账类别")
    private String actionType;


    /**
     * 总额金额
     */

    @Excel(name = "冲账类别")
    private BigDecimal amt;


    /**
     * 放款本金
     */

    @Excel(name = "冲账类别")
    private BigDecimal loanPrincipal;


    /**
     * 已还本金
     */

    @Excel(name = "冲账类别")
    private BigDecimal repaidPrincipal;


    /**
     * 服务费
     */

    @Excel(name = "冲账类别")
    private BigDecimal serviceFee;


    /**
     * 已还服务费
     */

    @Excel(name = "冲账类别")
    private BigDecimal repaidServiceFee;


    /**
     * 总利息
     */

    @Excel(name = "冲账类别")
    private BigDecimal loanInterest;


    /**
     * 已还总利息
     */

    @Excel(name = "冲账类别")
    private BigDecimal repaidInterest;


    /**
     * 滞纳金
     */

    @Excel(name = "滞纳金")
    private BigDecimal lateFee;


    /**
     * 已还滞纳金
     */

    @Excel(name = "冲账类别")
    private BigDecimal repaidLateFee;


    /**
     * 冲账结果，0:冲账失败，1:冲账成功，2:待冲账
     */

    @Excel(name = "冲账状态")
    private Integer loanOffsetStatus;


    /**
     * 减免金额
     */

    @Excel(name = "减免金额")
    private BigDecimal reduceAmt;


    /**
     * 冲账结果说明
     */

    @Excel(name = "冲账结果说明")
    private String loanOffsetDesc;


    /**
     * 冲账结余金额
     */

    @Excel(name = "冲账结余金额")
    private BigDecimal surplusAmt;


    /**
     * 状态
     */

    @Excel(name = "状态")
    private String state;


    /**
     * 备注
     */

    @Excel(name = "备注")
    private String remark;


    /**
     * 创建者
     */

    @Excel(name = "备注")
    private String createBy;


    /**
     * 创建时间
     */

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;


    /**
     * 更新者
     */

    @Excel(name = "更新者")
    private String updateBy;


    /**
     * 更新时间
     */

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;

    /***还款偿还本金*/
    private BigDecimal offsetPrincipal;// 还款偿还本金
    /***还款偿还利息*/
    private BigDecimal offsetInterest;//还款偿还利息
    /***还款偿还服务费*/
    private BigDecimal offsetServiceFee;//还款偿还服务费
    /***还款偿还滞纳金*/
    private BigDecimal offsetLateFee;

    /**
     * 还款服务费
     **/
    private BigDecimal offsetDeferredServiceFee;
    /**
     * 还款利息费
     **/
    private BigDecimal offsetDeferredInterestFee;

}